﻿using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using VideoClubGorbea.TheMovieDbServices;
using System.Linq;
using VideoClubGorbea.Model;
using VideoClubGorbea.Infraestructure;
using VideoClubGorbea.Tests.MovieServices;


namespace VideoClubGorbea.Tests
{
    [TestClass]
    public class TheMovieDBTests
    {


        [TestMethod]
        public void Search_For_Movie()
        {
            MovieDbServices services = new MovieDbServices();
            var result = services.SearchMovie("Transformers").Result.ToList();
            if (result.Count > 2)
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.Fail();
            }
            Assert.IsNotNull(result);
           
            
        }

        [TestMethod]
        public void test_wcf()
        {
            var client = new MovieServicesClient();
            var result = client.SearchMovies("karate Kid");
            Assert.IsNotNull(result);

        }

        [TestMethod]
        public void ProbarLaCreacionDeLaBaseDeDatosConEntityFrameworkCodeFirst()
        {
            VideoClubGorbea.Infraestructure.VideoClubGorbeaContext context = new VideoClubGorbea.Infraestructure.VideoClubGorbeaContext();
        }
    }
}
